import request from '@/util/request.js';

/**
 * @description 获取所有商品类型
 * @param {Object} data
 */
export function getGoodsTypeList(data) {
	return request({
		url: '/common/getGoodsTypeList',
		method: 'GET',
		data
	})
}
/**
 * @description 用户查询商品列表
 * @param {Object} data
 */
export function getUserGoodsList(data) {
	return request({
		url: '/goods/getUserGoodsList',
		method: 'GET',
		data
	})
}
/**
 * @description 商品详情
 * @param {Object} data
 */
export function getUserGoodsById(data) {
	return request({
		url: '/goods/getUserGoodsById',
		method: 'GET',
		data
	})
}
/**
 * @description 规格列表
 * @param {Object} data
 */
export function getGoodsSpecsList(data) {
	return request({
		url: '/goodsSpecs/getGoodsSpecsList',
		method: 'GET',
		data
	})
}
/**
 * @description 规格详情
 * @param {Object} data
 */
export function getGoodsSpecsById(data) {
	return request({
		url: '/goodsSpecs/getGoodsSpecsById',
		method: 'GET',
		data
	})
}
/**
 * @description 用户查询积分订单
 * @param {Object} data
 */
export function getIntegralOrderList(data) {
	return request({
		url: '/integralOrder/getIntegralOrderList',
		method: 'GET',
		data
	})
}
/**
 * @description 用户查询积分订单详情
 * @param {Object} data
 */
export function getIntegralOrderById(data) {
	return request({
		url: '/integralOrder/getIntegralOrderById',
		method: 'GET',
		data
	})
}
/**
 * @description 纯积分商品列表
 * @param {Object} data
 */
export function getIntegralGoodsList(data) {
	return request({
		url: '/integralGoods/getIntegralGoodsListUser',
		method: 'GET',
		data
	})
}
/**
 * @description 纯积分商品详情
 * @param {Object} data
 */
export function getIntegralGoodsById(data) {
	return request({
		url: '/integralGoods/getIntegralGoodsById',
		method: 'GET',
		data
	})
}
// /**
//  * @description 纯积分商品立即兑换
//  * @param {Object} data
//  */
// export function exchangeGoods(data) {
// 	return request({
// 		url: '/integralGoods/exchangeGoods',
// 		method: 'post',
// 		data
// 	})
// }
/**
 * @description 纯积分加券商品立即兑换
 * @param {Object} data
 */
export function goodsSpecsGoods(data) {
	return request({
		url: '/goodsSpecs/exchangeGoods',
		method: 'post',
		data
	})
}

/**
 * @description 签到
 * @param {Object} data
 */
export function sisignInApi(data) {
	return request({
		url: '/signIn/signIn',
		method: 'GET',
		data
	})
}
/**
 * @description 获取积分详情
 * @param {Object} data
 */
export function getIntegralRuleApi(data) {
	return request({
		url: '/integralRule/getIntegralRule',
		method: 'GET',
		data
	})
}
/**
 * @description 确认收货
 * @param {Object} data
 */
export function confirmReceipt(data) {
	return request({
		url: '/integralOrder/confirmReceipt',
		method: 'GET',
		data
	})
}
/**
 * @description 用户查询抽奖订单详情
 * @param {Object} data
 */
export function getRecordDetail(data) {
	return request({
		url: '/lotteryRecord/admin/recordDetail',
		method: 'GET',
		data
	})
}
/**
 * @description 确认收货
 * @param {Object} data
 */
export function confirmRecord(data) {
	return request({
		url: '/lotteryRecord/confirmReceipt',
		method: 'GET',
		data
	})
}

/**
 * 积分商品退款
 * @param {Object} data
 *
 */
export function refundOfIntegralGoods(data) {
	return request({
		url: '/integralOrder/refund',
		method: 'GET',
		data
	})
}
//用户主动取消订单
export function cancelOrderOfflineIntegralGoods(data) {
	return request({
		url: '/integralOrder/cancelOrderOfflineIntegralGoods',
		method: 'GET',
		data
	})
}
